.class public Lcom/instagram/android/creation/b/a;
.super Lcom/instagram/e/b/b;
.source "CameraFragment.java"

# interfaces
.implements Landroid/view/SurfaceHolder$Callback;
.implements Landroid/view/View$OnClickListener;
.implements Landroid/view/View$OnTouchListener;
.implements Lcom/instagram/camera/o;
.implements Lcom/instagram/camera/s;


# annotations
.annotation build Landroid/annotation/TargetApi;
    value = 0x9
.end annotation


# instance fields
.field private final Z:Lcom/instagram/android/creation/b/l;

.field a:Landroid/hardware/Camera;

.field private aA:Lcom/instagram/camera/ui/RotateLayout;

.field private aB:I

.field private aC:I

.field private aD:Z

.field private aE:Z

.field private aF:J

.field private aG:Ljava/lang/String;

.field private final aH:Lcom/instagram/camera/c;

.field private aI:I

.field private aJ:I

.field private aK:I

.field private aL:Lcom/instagram/android/creation/b/m;

.field private aM:Ljava/io/File;

.field private aN:Landroid/net/Uri;

.field private aO:Z

.field private aP:F

.field private final aQ:Landroid/content/BroadcastReceiver;

.field private aa:J

.field private final ab:Landroid/os/Handler;

.field private ac:Lcom/instagram/android/creation/b/p;

.field private ad:I

.field private ae:I

.field private af:Lcom/instagram/camera/k;

.field private ag:Landroid/hardware/Camera;

.field private ah:Landroid/hardware/Camera$Parameters;

.field private ai:Landroid/hardware/Camera$Parameters;

.field private aj:Z

.field private ak:Z

.field private al:Z

.field private am:Z

.field private an:Z

.field private ao:Lcom/instagram/camera/m;

.field private ap:Ljava/lang/String;

.field private aq:Landroid/view/SurfaceHolder;

.field private ar:Lcom/instagram/camera/ShutterButton;

.field private as:Lcom/instagram/android/creation/widget/ActionBarHighlightButton;

.field private at:Lcom/instagram/android/creation/widget/ActionBarHighlightButton;

.field private au:Z

.field private av:Z

.field private aw:Lcom/instagram/android/creation/widget/ActionBarHighlightButton;

.field private ax:Landroid/view/View;

.field private ay:Lcom/instagram/camera/SquarePreviewFrameLayout;

.field private az:Landroid/view/View;

.field b:I

.field c:Ljava/lang/Thread;

.field d:Ljava/lang/Thread;

.field private e:I

.field private f:I

.field private g:Landroid/content/ContentResolver;

.field private h:Z

.field private final i:Lcom/instagram/android/creation/b/r;


# direct methods
.method public constructor <init>()V
    .locals 3

    .prologue
    const/4 v2, 0x0

    const/4 v1, 0x0

    .line 88
    invoke-direct {p0}, Lcom/instagram/e/b/b;-><init>()V

    .line 114
    iput v2, p0, Lcom/instagram/android/creation/b/a;->e:I

    .line 125
    iput-boolean v2, p0, Lcom/instagram/android/creation/b/a;->h:Z

    .line 127
    new-instance v0, Lcom/instagram/android/creation/b/r;

    invoke-direct {v0, p0, v1}, Lcom/instagram/android/creation/b/r;-><init>(Lcom/instagram/android/creation/b/a;Lcom/instagram/android/creation/b/b;)V

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->i:Lcom/instagram/android/creation/b/r;

    .line 128
    new-instance v0, Lcom/instagram/android/creation/b/l;

    invoke-direct {v0, p0, v1}, Lcom/instagram/android/creation/b/l;-><init>(Lcom/instagram/android/creation/b/a;Lcom/instagram/android/creation/b/b;)V

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->Z:Lcom/instagram/android/creation/b/l;

    .line 132
    new-instance v0, Lcom/instagram/android/creation/b/o;

    invoke-direct {v0, p0, v1}, Lcom/instagram/android/creation/b/o;-><init>(Lcom/instagram/android/creation/b/a;Lcom/instagram/android/creation/b/b;)V

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->ab:Landroid/os/Handler;

    .line 139
    const/4 v0, -0x1

    iput v0, p0, Lcom/instagram/android/creation/b/a;->ad:I

    .line 142
    iput v2, p0, Lcom/instagram/android/creation/b/a;->ae:I

    .line 158
    iput-object v1, p0, Lcom/instagram/android/creation/b/a;->aq:Landroid/view/SurfaceHolder;

    .line 162
    iput-boolean v2, p0, Lcom/instagram/android/creation/b/a;->au:Z

    .line 163
    iput-boolean v2, p0, Lcom/instagram/android/creation/b/a;->av:Z

    .line 184
    new-instance v0, Lcom/instagram/camera/c;

    invoke-direct {v0}, Lcom/instagram/camera/c;-><init>()V

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->aH:Lcom/instagram/camera/c;

    .line 196
    iput-object v1, p0, Lcom/instagram/android/creation/b/a;->aN:Landroid/net/Uri;

    .line 197
    iput-boolean v2, p0, Lcom/instagram/android/creation/b/a;->aO:Z

    .line 198
    const/high16 v0, -0x4080

    iput v0, p0, Lcom/instagram/android/creation/b/a;->aP:F

    .line 317
    iput-object v1, p0, Lcom/instagram/android/creation/b/a;->c:Ljava/lang/Thread;

    .line 319
    iput-object v1, p0, Lcom/instagram/android/creation/b/a;->d:Ljava/lang/Thread;

    .line 328
    new-instance v0, Lcom/instagram/android/creation/b/d;

    invoke-direct {v0, p0}, Lcom/instagram/android/creation/b/d;-><init>(Lcom/instagram/android/creation/b/a;)V

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->aQ:Landroid/content/BroadcastReceiver;

    .line 1510
    return-void
.end method

.method static synthetic a(Lcom/instagram/android/creation/b/a;F)F
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 88
    iput p1, p0, Lcom/instagram/android/creation/b/a;->aP:F

    return p1
.end method

.method private a(Ljava/util/List;D)Landroid/hardware/Camera$Size;
    .locals 12
    .parameter
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Landroid/hardware/Camera$Size;",
            ">;D)",
            "Landroid/hardware/Camera$Size;"
        }
    .end annotation

    .prologue
    const/4 v4, 0x0

    const-wide v5, 0x7fefffffffffffffL

    .line 1243
    .line 1244
    if-nez p1, :cond_1

    .line 1286
    :cond_0
    return-object v4

    .line 1255
    :cond_1
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    invoke-virtual {v0}, Landroid/support/v4/app/j;->getWindowManager()Landroid/view/WindowManager;

    move-result-object v0

    invoke-interface {v0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v0

    .line 1256
    invoke-virtual {v0}, Landroid/view/Display;->getHeight()I

    move-result v1

    invoke-virtual {v0}, Landroid/view/Display;->getWidth()I

    move-result v0

    invoke-static {v1, v0}, Ljava/lang/Math;->min(II)I

    move-result v0

    .line 1258
    if-gtz v0, :cond_6

    .line 1260
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    const-string v1, "window"

    invoke-virtual {v0, v1}, Landroid/support/v4/app/j;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/WindowManager;

    .line 1262
    invoke-interface {v0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v0

    invoke-virtual {v0}, Landroid/view/Display;->getHeight()I

    move-result v0

    move v1, v0

    .line 1266
    :goto_0
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v7

    move-wide v2, v5

    :cond_2
    :goto_1
    invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_3

    invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/hardware/Camera$Size;

    .line 1267
    iget v8, v0, Landroid/hardware/Camera$Size;->width:I

    int-to-double v8, v8

    iget v10, v0, Landroid/hardware/Camera$Size;->height:I

    int-to-double v10, v10

    div-double/2addr v8, v10

    .line 1268
    sub-double/2addr v8, p2

    invoke-static {v8, v9}, Ljava/lang/Math;->abs(D)D

    move-result-wide v8

    const-wide v10, 0x3fa999999999999aL

    cmpl-double v8, v8, v10

    if-gtz v8, :cond_2

    .line 1269
    iget v8, v0, Landroid/hardware/Camera$Size;->height:I

    sub-int/2addr v8, v1

    invoke-static {v8}, Ljava/lang/Math;->abs(I)I

    move-result v8

    int-to-double v8, v8

    cmpg-double v8, v8, v2

    if-gez v8, :cond_5

    .line 1271
    iget v2, v0, Landroid/hardware/Camera$Size;->height:I

    sub-int/2addr v2, v1

    invoke-static {v2}, Ljava/lang/Math;->abs(I)I

    move-result v2

    int-to-double v2, v2

    :goto_2
    move-object v4, v0

    .line 1273
    goto :goto_1

    .line 1276
    :cond_3
    if-nez v4, :cond_0

    .line 1277
    const-string v0, "CameraFragment"

    const-string v2, "No preview size match the aspect ratio"

    invoke-static {v0, v2}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I

    .line 1279
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :cond_4
    :goto_3
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/hardware/Camera$Size;

    .line 1280
    iget v3, v0, Landroid/hardware/Camera$Size;->height:I

    sub-int/2addr v3, v1

    invoke-static {v3}, Ljava/lang/Math;->abs(I)I

    move-result v3

    int-to-double v7, v3

    cmpg-double v3, v7, v5

    if-gez v3, :cond_4

    .line 1282
    iget v3, v0, Landroid/hardware/Camera$Size;->height:I

    sub-int/2addr v3, v1

    invoke-static {v3}, Ljava/lang/Math;->abs(I)I

    move-result v3

    int-to-double v5, v3

    move-object v4, v0

    goto :goto_3

    :cond_5
    move-object v0, v4

    goto :goto_2

    :cond_6
    move v1, v0

    goto :goto_0
.end method

.method static synthetic a(Lcom/instagram/android/creation/b/a;Landroid/hardware/Camera;)Landroid/hardware/Camera;
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 88
    iput-object p1, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    return-object p1
.end method

.method static synthetic a(Lcom/instagram/android/creation/b/a;Landroid/net/Uri;)Landroid/net/Uri;
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 88
    iput-object p1, p0, Lcom/instagram/android/creation/b/a;->aN:Landroid/net/Uri;

    return-object p1
.end method

.method private a(Landroid/view/SurfaceHolder;)V
    .locals 2
    .parameter

    .prologue
    .line 868
    :try_start_0
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    invoke-virtual {v0, p1}, Landroid/hardware/Camera;->setPreviewDisplay(Landroid/view/SurfaceHolder;)V
    :try_end_0
    .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0

    .line 874
    :goto_0
    return-void

    .line 869
    :catch_0
    move-exception v0

    .line 870
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->aq()V

    .line 871
    const-string v1, "setPreviewDisplay failed"

    invoke-virtual {v0}, Ljava/lang/Throwable;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v1, v0}, Lcom/instagram/g/c;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 872
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    sget v1, Lcom/facebook/ba;->cannot_connect_camera:I

    invoke-static {v0, v1}, Lcom/instagram/camera/h;->b(Landroid/app/Activity;I)V

    goto :goto_0
.end method

.method static synthetic a(Lcom/instagram/android/creation/b/a;)V
    .locals 0
    .parameter

    .prologue
    .line 88
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->ad()V

    return-void
.end method

.method static synthetic a(Lcom/instagram/android/creation/b/a;I)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 88
    invoke-direct {p0, p1}, Lcom/instagram/android/creation/b/a;->e(I)V

    return-void
.end method

.method private a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 0
    .parameter
    .parameter
    .parameter

    .prologue
    .line 1045
    return-void
.end method

.method static synthetic a(Lcom/instagram/android/creation/b/a;Z)Z
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 88
    iput-boolean p1, p0, Lcom/instagram/android/creation/b/a;->au:Z

    return p1
.end method

.method private static a(Ljava/lang/String;Ljava/util/List;)Z
    .locals 1
    .parameter
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;)Z"
        }
    .end annotation

    .prologue
    .line 945
    if-eqz p1, :cond_0

    invoke-interface {p1, p0}, Ljava/util/List;->indexOf(Ljava/lang/Object;)I

    move-result v0

    if-ltz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method private aA()Z
    .locals 2

    .prologue
    const/4 v0, 0x1

    .line 1664
    iget v1, p0, Lcom/instagram/android/creation/b/a;->e:I

    if-eq v1, v0, :cond_0

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    invoke-virtual {v1}, Lcom/instagram/camera/m;->n()Z

    move-result v1

    if-eqz v1, :cond_1

    :cond_0
    :goto_0
    return v0

    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method

.method private aB()V
    .locals 2

    .prologue
    .line 1668
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    invoke-virtual {v0}, Landroid/hardware/Camera;->getParameters()Landroid/hardware/Camera$Parameters;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->ai:Landroid/hardware/Camera$Parameters;

    .line 1669
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ai:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v0, v1}, Lcom/instagram/camera/m;->a(Landroid/hardware/Camera$Parameters;)V

    .line 1671
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0xe

    if-lt v0, v1, :cond_1

    .line 1672
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->aC()V

    .line 1679
    :cond_0
    :goto_0
    return-void

    .line 1675
    :cond_1
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    invoke-virtual {v0}, Lcom/instagram/camera/m;->i()Ljava/lang/String;

    move-result-object v0

    const-string v1, "auto"

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 1676
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/instagram/android/creation/b/a;->al:Z

    goto :goto_0
.end method

.method private aC()V
    .locals 4
    .annotation build Landroid/annotation/TargetApi;
        value = 0xe
    .end annotation

    .prologue
    const/4 v1, 0x1

    const/4 v2, 0x0

    .line 1683
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ai:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v0}, Landroid/hardware/Camera$Parameters;->getMaxNumFocusAreas()I

    move-result v0

    .line 1684
    if-lez v0, :cond_0

    const-string v0, "auto"

    iget-object v3, p0, Lcom/instagram/android/creation/b/a;->ai:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v3}, Landroid/hardware/Camera$Parameters;->getSupportedFocusModes()Ljava/util/List;

    move-result-object v3

    invoke-static {v0, v3}, Lcom/instagram/android/creation/b/a;->a(Ljava/lang/String;Ljava/util/List;)Z

    move-result v0

    if-eqz v0, :cond_0

    move v0, v1

    :goto_0
    iput-boolean v0, p0, Lcom/instagram/android/creation/b/a;->aj:Z

    .line 1688
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ai:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v0}, Landroid/hardware/Camera$Parameters;->getMaxNumMeteringAreas()I

    move-result v0

    if-lez v0, :cond_1

    move v0, v1

    :goto_1
    iput-boolean v0, p0, Lcom/instagram/android/creation/b/a;->ak:Z

    .line 1689
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ai:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v0}, Landroid/hardware/Camera$Parameters;->isAutoExposureLockSupported()Z

    move-result v0

    iput-boolean v0, p0, Lcom/instagram/android/creation/b/a;->am:Z

    .line 1690
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ai:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v0}, Landroid/hardware/Camera$Parameters;->isAutoWhiteBalanceLockSupported()Z

    move-result v0

    if-eqz v0, :cond_2

    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->aD()Z

    move-result v0

    if-nez v0, :cond_2

    :goto_2
    iput-boolean v1, p0, Lcom/instagram/android/creation/b/a;->an:Z

    .line 1691
    return-void

    :cond_0
    move v0, v2

    .line 1684
    goto :goto_0

    :cond_1
    move v0, v2

    .line 1688
    goto :goto_1

    :cond_2
    move v1, v2

    .line 1690
    goto :goto_2
.end method

.method private aD()Z
    .locals 3

    .prologue
    const/4 v2, -0x1

    .line 1701
    sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;

    const-string v1, "LG-E612f"

    invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    if-ne v0, v2, :cond_0

    sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;

    const-string v1, "LG-E612"

    invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    if-ne v0, v2, :cond_0

    sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;

    const-string v1, "LG-E610v"

    invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    if-ne v0, v2, :cond_0

    sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;

    const-string v1, "LG-E610G"

    invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    if-ne v0, v2, :cond_0

    sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;

    const-string v1, "LG-E615f"

    invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    if-ne v0, v2, :cond_0

    sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;

    const-string v1, "LG-E610"

    invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    if-ne v0, v2, :cond_0

    sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;

    const-string v1, "LG-E617G"

    invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    if-ne v0, v2, :cond_0

    sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;

    const-string v1, "LG-P705f"

    invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    if-ne v0, v2, :cond_0

    sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;

    const-string v1, "LG-P705g"

    invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    if-ne v0, v2, :cond_0

    sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;

    const-string v1, "LG-P708g"

    invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    if-ne v0, v2, :cond_0

    sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;

    const-string v1, "LG-E615F"

    invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v0

    if-eq v0, v2, :cond_1

    :cond_0
    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method

.method private ac()V
    .locals 3

    .prologue
    .line 240
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->af:Lcom/instagram/camera/k;

    const-string v1, "pref_camera_exposure_key"

    const-string v2, "0"

    invoke-virtual {v0, v1, v2}, Lcom/instagram/camera/k;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 242
    const-string v1, "0"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 243
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->af:Lcom/instagram/camera/k;

    invoke-virtual {v0}, Lcom/instagram/camera/k;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    .line 244
    const-string v1, "pref_camera_exposure_key"

    const-string v2, "0"

    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    .line 245
    invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->apply()V

    .line 247
    :cond_0
    return-void
.end method

.method private ad()V
    .locals 7

    .prologue
    const/4 v6, 0x1

    .line 250
    iget-boolean v0, p0, Lcom/instagram/android/creation/b/a;->aE:Z

    if-eqz v0, :cond_0

    .line 289
    :goto_0
    return-void

    .line 256
    :cond_0
    new-instance v0, Lcom/instagram/android/creation/b/p;

    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v1

    invoke-direct {v0, p0, v1}, Lcom/instagram/android/creation/b/p;-><init>(Lcom/instagram/android/creation/b/a;Landroid/content/Context;)V

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->ac:Lcom/instagram/android/creation/b/p;

    .line 257
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ac:Lcom/instagram/android/creation/b/p;

    invoke-virtual {v0}, Lcom/instagram/android/creation/b/p;->a()V

    .line 259
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->aH:Lcom/instagram/camera/c;

    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/instagram/camera/c;->a(Landroid/app/Activity;)V

    .line 261
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->az()V

    .line 264
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    invoke-virtual {v0}, Landroid/support/v4/app/j;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->g:Landroid/content/ContentResolver;

    .line 267
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    sget v1, Lcom/facebook/aw;->camera_preview:I

    invoke-virtual {v0, v1}, Landroid/support/v4/app/j;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->az:Landroid/view/View;

    .line 268
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->az:Landroid/view/View;

    invoke-virtual {v0, p0}, Landroid/view/View;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V

    .line 269
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    sget v1, Lcom/facebook/aw;->focus_indicator_rotate_layout:I

    invoke-virtual {v0, v1}, Landroid/support/v4/app/j;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/instagram/camera/ui/RotateLayout;

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->aA:Lcom/instagram/camera/ui/RotateLayout;

    .line 270
    invoke-static {}, Lcom/instagram/camera/e;->a()Lcom/instagram/camera/e;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/camera/e;->c()[Landroid/hardware/Camera$CameraInfo;

    move-result-object v0

    iget v1, p0, Lcom/instagram/android/creation/b/a;->aI:I

    aget-object v0, v0, v1

    .line 272
    iget v0, v0, Landroid/hardware/Camera$CameraInfo;->facing:I

    if-ne v0, v6, :cond_2

    move v4, v6

    .line 274
    :goto_1
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->aA:Lcom/instagram/camera/ui/RotateLayout;

    iget-object v2, p0, Lcom/instagram/android/creation/b/a;->az:Landroid/view/View;

    iget v5, p0, Lcom/instagram/android/creation/b/a;->aC:I

    move-object v3, p0

    invoke-virtual/range {v0 .. v5}, Lcom/instagram/camera/m;->a(Landroid/view/View;Landroid/view/View;Lcom/instagram/camera/o;ZI)V

    .line 275
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->l()Landroid/content/res/Resources;

    move-result-object v1

    sget v2, Lcom/facebook/az;->camera_focus:I

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->openRawResourceFd(I)Landroid/content/res/AssetFileDescriptor;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/instagram/camera/m;->a(Landroid/content/res/AssetFileDescriptor;)V

    .line 277
    new-instance v0, Lcom/instagram/android/creation/b/m;

    invoke-direct {v0, p0}, Lcom/instagram/android/creation/b/m;-><init>(Lcom/instagram/android/creation/b/a;)V

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->aL:Lcom/instagram/android/creation/b/m;

    .line 278
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->ao()V

    .line 281
    iget-boolean v0, p0, Lcom/instagram/android/creation/b/a;->aj:Z

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->af:Lcom/instagram/camera/k;

    const-string v1, "pref_tap_to_focus_prompt_shown_key"

    invoke-virtual {v0, v1, v6}, Lcom/instagram/camera/k;->getBoolean(Ljava/lang/String;Z)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 283
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ab:Landroid/os/Handler;

    const/4 v1, 0x6

    const-wide/16 v2, 0x3e8

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z

    .line 286
    :cond_1
    iput-boolean v6, p0, Lcom/instagram/android/creation/b/a;->aE:Z

    .line 288
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->ae()V

    goto/16 :goto_0

    .line 272
    :cond_2
    const/4 v4, 0x0

    goto :goto_1
.end method

.method private ae()V
    .locals 2

    .prologue
    .line 292
    invoke-static {}, Landroid/os/Looper;->myQueue()Landroid/os/MessageQueue;

    move-result-object v0

    .line 293
    new-instance v1, Lcom/instagram/android/creation/b/b;

    invoke-direct {v1, p0}, Lcom/instagram/android/creation/b/b;-><init>(Lcom/instagram/android/creation/b/a;)V

    invoke-virtual {v0, v1}, Landroid/os/MessageQueue;->addIdleHandler(Landroid/os/MessageQueue$IdleHandler;)V

    .line 299
    return-void
.end method

.method private af()V
    .locals 3

    .prologue
    .line 304
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ac:Lcom/instagram/android/creation/b/p;

    invoke-virtual {v0}, Lcom/instagram/android/creation/b/p;->a()V

    .line 306
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->ao()V

    .line 307
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->l()Landroid/content/res/Resources;

    move-result-object v1

    sget v2, Lcom/facebook/az;->camera_focus:I

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->openRawResourceFd(I)Landroid/content/res/AssetFileDescriptor;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/instagram/camera/m;->a(Landroid/content/res/AssetFileDescriptor;)V

    .line 308
    new-instance v0, Lcom/instagram/android/creation/b/m;

    invoke-direct {v0, p0}, Lcom/instagram/android/creation/b/m;-><init>(Lcom/instagram/android/creation/b/a;)V

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->aL:Lcom/instagram/android/creation/b/m;

    .line 309
    return-void
.end method

.method private ag()V
    .locals 2

    .prologue
    .line 312
    new-instance v0, Lcom/instagram/camera/k;

    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/instagram/camera/k;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->af:Lcom/instagram/camera/k;

    .line 313
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->af:Lcom/instagram/camera/k;

    invoke-virtual {v0}, Lcom/instagram/camera/k;->a()Landroid/content/SharedPreferences;

    move-result-object v0

    invoke-static {v0}, Lcom/instagram/camera/g;->b(Landroid/content/SharedPreferences;)V

    .line 314
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->af:Lcom/instagram/camera/k;

    invoke-static {v0}, Lcom/instagram/camera/g;->c(Landroid/content/SharedPreferences;)I

    move-result v0

    iput v0, p0, Lcom/instagram/android/creation/b/a;->aI:I

    .line 315
    return-void
.end method

.method private ah()Z
    .locals 2

    .prologue
    .line 593
    iget-boolean v0, p0, Lcom/instagram/android/creation/b/a;->aO:Z

    .line 594
    const/4 v1, 0x0

    iput-boolean v1, p0, Lcom/instagram/android/creation/b/a;->aO:Z

    .line 595
    return v0
.end method

.method private ai()V
    .locals 2

    .prologue
    .line 631
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ab:Landroid/os/Handler;

    const/4 v1, 0x3

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    .line 632
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    invoke-virtual {v0}, Landroid/support/v4/app/j;->getWindow()Landroid/view/Window;

    move-result-object v0

    const/16 v1, 0x80

    invoke-virtual {v0, v1}, Landroid/view/Window;->clearFlags(I)V

    .line 633
    return-void
.end method

.method private aj()V
    .locals 4

    .prologue
    const/4 v3, 0x3

    .line 636
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ab:Landroid/os/Handler;

    invoke-virtual {v0, v3}, Landroid/os/Handler;->removeMessages(I)V

    .line 637
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    invoke-virtual {v0}, Landroid/support/v4/app/j;->getWindow()Landroid/view/Window;

    move-result-object v0

    const/16 v1, 0x80

    invoke-virtual {v0, v1}, Landroid/view/Window;->addFlags(I)V

    .line 638
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ab:Landroid/os/Handler;

    const-wide/32 v1, 0x1d4c0

    invoke-virtual {v0, v3, v1, v2}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z

    .line 639
    return-void
.end method

.method private ak()V
    .locals 1

    .prologue
    .line 668
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/instagram/android/creation/b/a;->aO:Z

    .line 669
    return-void
.end method

.method private al()Z
    .locals 3

    .prologue
    const/4 v0, 0x0

    .line 717
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->i()Landroid/os/Bundle;

    move-result-object v1

    if-eqz v1, :cond_0

    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->i()Landroid/os/Bundle;

    move-result-object v1

    const-string v2, "directShare"

    invoke-virtual {v1, v2, v0}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;Z)Z

    move-result v1

    if-eqz v1, :cond_0

    const/4 v0, 0x1

    :cond_0
    return v0
.end method

.method private am()V
    .locals 2

    .prologue
    .line 722
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/instagram/n/a;->b(Landroid/content/Context;)Ljava/io/File;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->aM:Ljava/io/File;

    .line 723
    const/4 v0, 0x0

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->aM:Ljava/io/File;

    invoke-static {p0, v0, v1}, Lcom/instagram/creation/base/e;->a(Landroid/support/v4/app/Fragment;ILjava/io/File;)V

    .line 724
    return-void
.end method

.method private an()V
    .locals 5

    .prologue
    .line 727
    const/4 v0, 0x0

    .line 729
    iget-wide v1, p0, Lcom/instagram/android/creation/b/a;->aa:J

    const-wide/16 v3, -0x1

    cmp-long v1, v1, v3

    if-nez v1, :cond_2

    .line 730
    sget v0, Lcom/facebook/ba;->no_storage:I

    invoke-virtual {p0, v0}, Lcom/instagram/android/creation/b/a;->b(I)Ljava/lang/String;

    move-result-object v0

    .line 739
    :cond_0
    :goto_0
    if-eqz v0, :cond_1

    .line 740
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v1

    const/4 v2, 0x1

    invoke-static {v1, v0, v2}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    .line 741
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    invoke-virtual {v0}, Landroid/support/v4/app/j;->finish()V

    .line 743
    :cond_1
    return-void

    .line 731
    :cond_2
    iget-wide v1, p0, Lcom/instagram/android/creation/b/a;->aa:J

    const-wide/16 v3, -0x2

    cmp-long v1, v1, v3

    if-nez v1, :cond_3

    .line 732
    sget v0, Lcom/facebook/ba;->preparing_sd:I

    invoke-virtual {p0, v0}, Lcom/instagram/android/creation/b/a;->b(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    .line 733
    :cond_3
    iget-wide v1, p0, Lcom/instagram/android/creation/b/a;->aa:J

    const-wide/16 v3, -0x3

    cmp-long v1, v1, v3

    if-nez v1, :cond_4

    .line 734
    sget v0, Lcom/facebook/ba;->access_sd_fail:I

    invoke-virtual {p0, v0}, Lcom/instagram/android/creation/b/a;->b(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    .line 735
    :cond_4
    iget-wide v1, p0, Lcom/instagram/android/creation/b/a;->aa:J

    const-wide/16 v3, 0x1

    cmp-long v1, v1, v3

    if-gez v1, :cond_0

    .line 736
    sget v0, Lcom/facebook/ba;->not_enough_space:I

    invoke-virtual {p0, v0}, Lcom/instagram/android/creation/b/a;->b(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

.method private ao()V
    .locals 3

    .prologue
    .line 747
    new-instance v0, Landroid/content/IntentFilter;

    const-string v1, "android.intent.action.MEDIA_MOUNTED"

    invoke-direct {v0, v1}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V

    .line 749
    const-string v1, "android.intent.action.MEDIA_UNMOUNTED"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 750
    const-string v1, "android.intent.action.MEDIA_SCANNER_FINISHED"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 751
    const-string v1, "android.intent.action.MEDIA_CHECKING"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V

    .line 752
    const-string v1, "file"

    invoke-virtual {v0, v1}, Landroid/content/IntentFilter;->addDataScheme(Ljava/lang/String;)V

    .line 754
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v1

    iget-object v2, p0, Lcom/instagram/android/creation/b/a;->aQ:Landroid/content/BroadcastReceiver;

    invoke-virtual {v1, v2, v0}, Landroid/support/v4/app/j;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;

    .line 756
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/instagram/android/creation/b/a;->h:Z

    .line 757
    return-void
.end method

.method private ap()Z
    .locals 1

    .prologue
    .line 760
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->aA()Z

    move-result v0

    return v0
.end method

.method private aq()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 857
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    if-eqz v0, :cond_0

    .line 858
    invoke-static {}, Lcom/instagram/camera/e;->a()Lcom/instagram/camera/e;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/camera/e;->d()V

    .line 859
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    invoke-virtual {v0, v1}, Landroid/hardware/Camera;->setErrorCallback(Landroid/hardware/Camera$ErrorCallback;)V

    .line 860
    iput-object v1, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    .line 861
    const/4 v0, 0x0

    iput v0, p0, Lcom/instagram/android/creation/b/a;->e:I

    .line 862
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    invoke-virtual {v0}, Lcom/instagram/camera/m;->g()V

    .line 864
    :cond_0
    return-void
.end method

.method private ar()V
    .locals 2

    .prologue
    .line 881
    :try_start_0
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0xe

    if-ge v0, v1, :cond_0

    iget v0, p0, Lcom/instagram/android/creation/b/a;->e:I

    if-nez v0, :cond_1

    .line 882
    :cond_0
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    const/16 v1, 0x5a

    invoke-virtual {v0, v1}, Landroid/hardware/Camera;->setDisplayOrientation(I)V

    .line 894
    :goto_0
    return-void

    .line 884
    :cond_1
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->a:Landroid/hardware/Camera;

    invoke-virtual {v0}, Landroid/hardware/Camera;->stopPreview()V

    .line 885
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->a:Landroid/hardware/Camera;

    const/16 v1, 0x5a

    invoke-virtual {v0, v1}, Landroid/hardware/Camera;->setDisplayOrientation(I)V

    .line 886
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->a:Landroid/hardware/Camera;

    invoke-virtual {v0}, Landroid/hardware/Camera;->startPreview()V
    :try_end_0
    .catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 888
    :catch_0
    move-exception v0

    .line 889
    const-string v0, "CameraFragment"

    const-string v1, "Error setting display orientation"

    invoke-static {v0, v1}, Lcom/facebook/e/a/a;->e(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0
.end method

.method private as()V
    .locals 2

    .prologue
    .line 897
    iget-boolean v0, p0, Lcom/instagram/android/creation/b/a;->aD:Z

    if-nez v0, :cond_0

    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    invoke-virtual {v0}, Landroid/support/v4/app/j;->isFinishing()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 933
    :cond_0
    :goto_0
    return-void

    .line 901
    :cond_1
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->aH:Lcom/instagram/camera/c;

    invoke-virtual {v0, v1}, Landroid/hardware/Camera;->setErrorCallback(Landroid/hardware/Camera$ErrorCallback;)V

    .line 905
    iget v0, p0, Lcom/instagram/android/creation/b/a;->e:I

    if-eqz v0, :cond_2

    .line 906
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->at()V

    .line 909
    :cond_2
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->aq:Landroid/view/SurfaceHolder;

    invoke-direct {p0, v0}, Lcom/instagram/android/creation/b/a;->a(Landroid/view/SurfaceHolder;)V

    .line 910
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->ar()V

    .line 912
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/instagram/camera/m;->b(Z)V

    .line 913
    const/4 v0, -0x1

    invoke-direct {p0, v0}, Lcom/instagram/android/creation/b/a;->f(I)V

    .line 916
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->d:Ljava/lang/Thread;

    if-eqz v0, :cond_3

    .line 917
    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->d:Ljava/lang/Thread;

    monitor-enter v1

    .line 918
    :try_start_0
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->d:Ljava/lang/Thread;

    invoke-virtual {v0}, Ljava/lang/Object;->notify()V

    .line 919
    monitor-exit v1
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 923
    :cond_3
    :try_start_1
    const-string v0, "CameraFragment"

    const-string v1, "startPreview"

    invoke-static {v0, v1}, Lcom/facebook/e/a/a;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 924
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    invoke-virtual {v0}, Landroid/hardware/Camera;->startPreview()V
    :try_end_1
    .catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_1} :catch_0

    .line 931
    :goto_1
    const/4 v0, 0x1

    iput v0, p0, Lcom/instagram/android/creation/b/a;->e:I

    .line 932
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    invoke-virtual {v0}, Lcom/instagram/camera/m;->e()V

    goto :goto_0

    .line 919
    :catchall_0
    move-exception v0

    :try_start_2
    monitor-exit v1
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    throw v0

    .line 925
    :catch_0
    move-exception v0

    .line 926
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->aq()V

    .line 927
    const-string v1, "startPreview failed"

    invoke-virtual {v0}, Ljava/lang/Throwable;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v1, v0}, Lcom/instagram/g/c;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 928
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    sget v1, Lcom/facebook/ba;->cannot_connect_camera:I

    invoke-static {v0, v1}, Lcom/instagram/camera/h;->b(Landroid/app/Activity;I)V

    goto :goto_1
.end method

.method private at()V
    .locals 2

    .prologue
    .line 936
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    if-eqz v0, :cond_0

    iget v0, p0, Lcom/instagram/android/creation/b/a;->e:I

    if-eqz v0, :cond_0

    .line 937
    const-string v0, "CameraFragment"

    const-string v1, "stopPreview"

    invoke-static {v0, v1}, Lcom/facebook/e/a/a;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 938
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    invoke-virtual {v0}, Landroid/hardware/Camera;->stopPreview()V

    .line 940
    :cond_0
    const/4 v0, 0x0

    iput v0, p0, Lcom/instagram/android/creation/b/a;->e:I

    .line 941
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    invoke-virtual {v0}, Lcom/instagram/camera/m;->f()V

    .line 942
    return-void
.end method

.method private au()V
    .locals 3

    .prologue
    .line 951
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v0}, Landroid/hardware/Camera$Parameters;->getSupportedPreviewFrameRates()Ljava/util/List;

    move-result-object v0

    .line 952
    if-eqz v0, :cond_0

    .line 953
    invoke-static {v0}, Ljava/util/Collections;->max(Ljava/util/Collection;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Integer;

    .line 954
    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    invoke-virtual {v1, v0}, Landroid/hardware/Camera$Parameters;->setPreviewFrameRate(I)V

    .line 957
    :cond_0
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0xe

    if-lt v0, v1, :cond_1

    .line 958
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->av()V

    .line 963
    :cond_1
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    const-string v1, "video-stabilization-supported"

    invoke-virtual {v0, v1}, Landroid/hardware/Camera$Parameters;->get(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 964
    const-string v1, "true"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 965
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    const-string v1, "video-stabilization"

    const-string v2, "false"

    invoke-virtual {v0, v1, v2}, Landroid/hardware/Camera$Parameters;->set(Ljava/lang/String;Ljava/lang/String;)V

    .line 967
    :cond_2
    return-void
.end method

.method private av()V
    .locals 2
    .annotation build Landroid/annotation/TargetApi;
        value = 0xe
    .end annotation

    .prologue
    .line 971
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/hardware/Camera$Parameters;->setRecordingHint(Z)V

    .line 972
    return-void
.end method

.method private aw()V
    .locals 3

    .prologue
    const/4 v2, 0x0

    .line 1029
    const-string v0, "auto"

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ap:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 1030
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v0}, Landroid/hardware/Camera$Parameters;->getFlashMode()Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v1}, Landroid/hardware/Camera$Parameters;->getWhiteBalance()Ljava/lang/String;

    move-result-object v1

    iget-object v2, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v2}, Landroid/hardware/Camera$Parameters;->getFocusMode()Ljava/lang/String;

    move-result-object v2

    invoke-direct {p0, v0, v1, v2}, Lcom/instagram/android/creation/b/a;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 1035
    :goto_0
    return-void

    .line 1033
    :cond_0
    invoke-direct {p0, v2, v2, v2}, Lcom/instagram/android/creation/b/a;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0
.end method

.method private ax()V
    .locals 10

    .prologue
    const/4 v9, 0x0

    const/4 v8, 0x1

    const/4 v7, -0x2

    const/16 v6, 0x8

    .line 1048
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0xe

    if-lt v0, v1, :cond_0

    .line 1049
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->ay()V

    .line 1053
    :cond_0
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->af:Lcom/instagram/camera/k;

    const-string v1, "pref_camera_picturesize_key_V7"

    invoke-virtual {v0, v1, v9}, Lcom/instagram/camera/k;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 1055
    if-nez v0, :cond_6

    .line 1056
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-static {v0}, Lcom/instagram/camera/g;->a(Landroid/hardware/Camera$Parameters;)V

    .line 1062
    :goto_0
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v0}, Landroid/hardware/Camera$Parameters;->getPictureSize()Landroid/hardware/Camera$Size;

    move-result-object v0

    .line 1064
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->v()Landroid/view/View;

    move-result-object v1

    sget v2, Lcom/facebook/aw;->frame_layout:I

    invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    iput-object v1, p0, Lcom/instagram/android/creation/b/a;->ax:Landroid/view/View;

    .line 1068
    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v1}, Landroid/hardware/Camera$Parameters;->getSupportedPreviewSizes()Ljava/util/List;

    move-result-object v1

    .line 1071
    iget v2, v0, Landroid/hardware/Camera$Size;->width:I

    int-to-double v2, v2

    iget v0, v0, Landroid/hardware/Camera$Size;->height:I

    int-to-double v4, v0

    div-double/2addr v2, v4

    invoke-direct {p0, v1, v2, v3}, Lcom/instagram/android/creation/b/a;->a(Ljava/util/List;D)Landroid/hardware/Camera$Size;

    move-result-object v1

    .line 1074
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v0}, Landroid/hardware/Camera$Parameters;->getPreviewSize()Landroid/hardware/Camera$Size;

    move-result-object v0

    .line 1075
    invoke-virtual {v0, v1}, Landroid/hardware/Camera$Size;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_1

    .line 1076
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    iget v2, v1, Landroid/hardware/Camera$Size;->width:I

    iget v3, v1, Landroid/hardware/Camera$Size;->height:I

    invoke-virtual {v0, v2, v3}, Landroid/hardware/Camera$Parameters;->setPreviewSize(II)V

    .line 1080
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    iget-object v2, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v0, v2}, Landroid/hardware/Camera;->setParameters(Landroid/hardware/Camera$Parameters;)V

    .line 1081
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    invoke-virtual {v0}, Landroid/hardware/Camera;->getParameters()Landroid/hardware/Camera$Parameters;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    .line 1083
    :cond_1
    const-string v0, "CameraFragment"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Preview size is "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget v3, v1, Landroid/hardware/Camera$Size;->width:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, "x"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget v3, v1, Landroid/hardware/Camera$Size;->height:I

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v0, v2}, Lcom/facebook/e/a/a;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 1085
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->v()Landroid/view/View;

    move-result-object v0

    sget v2, Lcom/facebook/aw;->frame:I

    invoke-virtual {v0, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/instagram/camera/SquarePreviewFrameLayout;

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->ay:Lcom/instagram/camera/SquarePreviewFrameLayout;

    .line 1086
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ay:Lcom/instagram/camera/SquarePreviewFrameLayout;

    iget v2, v1, Landroid/hardware/Camera$Size;->height:I

    int-to-double v2, v2

    iget v1, v1, Landroid/hardware/Camera$Size;->width:I

    int-to-double v4, v1

    div-double v1, v2, v4

    invoke-virtual {v0, v1, v2}, Lcom/instagram/camera/SquarePreviewFrameLayout;->setAspectRatio(D)V

    .line 1090
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->af:Lcom/instagram/camera/k;

    const-string v1, "pref_camera_scenemode_key"

    sget v2, Lcom/facebook/ba;->pref_camera_scenemode_default:I

    invoke-virtual {p0, v2}, Lcom/instagram/android/creation/b/a;->b(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lcom/instagram/camera/k;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->ap:Ljava/lang/String;

    .line 1092
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ap:Ljava/lang/String;

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v1}, Landroid/hardware/Camera$Parameters;->getSupportedSceneModes()Ljava/util/List;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/instagram/android/creation/b/a;->a(Ljava/lang/String;Ljava/util/List;)Z

    move-result v0

    if-eqz v0, :cond_7

    .line 1093
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v0}, Landroid/hardware/Camera$Parameters;->getSceneMode()Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ap:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_2

    .line 1094
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ap:Ljava/lang/String;

    invoke-virtual {v0, v1}, Landroid/hardware/Camera$Parameters;->setSceneMode(Ljava/lang/String;)V

    .line 1095
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v0, v1}, Landroid/hardware/Camera;->setParameters(Landroid/hardware/Camera$Parameters;)V

    .line 1100
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    invoke-virtual {v0}, Landroid/hardware/Camera;->getParameters()Landroid/hardware/Camera$Parameters;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    .line 1110
    :cond_2
    :goto_1
    iget v0, p0, Lcom/instagram/android/creation/b/a;->aI:I

    const/4 v1, 0x2

    invoke-static {v0, v1}, Landroid/media/CameraProfile;->getJpegEncodingQualityParameter(II)I

    move-result v0

    .line 1111
    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v1, v0}, Landroid/hardware/Camera$Parameters;->setJpegQuality(I)V

    .line 1117
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->af:Lcom/instagram/camera/k;

    invoke-static {v0}, Lcom/instagram/camera/g;->a(Lcom/instagram/camera/k;)I

    move-result v0

    .line 1118
    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v1}, Landroid/hardware/Camera$Parameters;->getMaxExposureCompensation()I

    move-result v1

    .line 1119
    iget-object v2, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v2}, Landroid/hardware/Camera$Parameters;->getMinExposureCompensation()I

    move-result v2

    .line 1120
    if-lt v0, v2, :cond_8

    if-gt v0, v1, :cond_8

    .line 1121
    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v1, v0}, Landroid/hardware/Camera$Parameters;->setExposureCompensation(I)V

    .line 1126
    :goto_2
    const-string v0, "auto"

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ap:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_c

    .line 1128
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->af:Lcom/instagram/camera/k;

    const-string v1, "pref_camera_flashmode_key"

    sget v2, Lcom/facebook/ba;->pref_camera_flash_mode_off:I

    invoke-virtual {p0, v2}, Lcom/instagram/android/creation/b/a;->b(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lcom/instagram/camera/k;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 1130
    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v1}, Landroid/hardware/Camera$Parameters;->getSupportedFlashModes()Ljava/util/List;

    move-result-object v1

    .line 1131
    invoke-static {v0, v1}, Lcom/instagram/android/creation/b/a;->a(Ljava/lang/String;Ljava/util/List;)Z

    move-result v2

    if-eqz v2, :cond_9

    .line 1132
    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v1, v0}, Landroid/hardware/Camera$Parameters;->setFlashMode(Ljava/lang/String;)V

    .line 1143
    :goto_3
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->af:Lcom/instagram/camera/k;

    const-string v1, "pref_camera_whitebalance_key"

    sget v2, Lcom/facebook/ba;->pref_camera_whitebalance_default:I

    invoke-virtual {p0, v2}, Lcom/instagram/android/creation/b/a;->b(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Lcom/instagram/camera/k;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 1147
    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v1}, Landroid/hardware/Camera$Parameters;->getSupportedWhiteBalance()Ljava/util/List;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/instagram/android/creation/b/a;->a(Ljava/lang/String;Ljava/util/List;)Z

    move-result v1

    if-eqz v1, :cond_b

    .line 1148
    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v1, v0}, Landroid/hardware/Camera$Parameters;->setWhiteBalance(Ljava/lang/String;)V

    .line 1157
    :cond_3
    :goto_4
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    invoke-virtual {v0, v9}, Lcom/instagram/camera/m;->a(Ljava/lang/String;)V

    .line 1158
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    invoke-virtual {v1}, Lcom/instagram/camera/m;->i()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/hardware/Camera$Parameters;->setFocusMode(Ljava/lang/String;)V

    .line 1166
    :goto_5
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->v()Landroid/view/View;

    move-result-object v0

    sget v1, Lcom/facebook/aw;->action_bar_camera_controls_flash_button:I

    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;

    .line 1168
    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v1}, Landroid/hardware/Camera$Parameters;->getFlashMode()Ljava/lang/String;

    move-result-object v2

    .line 1169
    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v1}, Landroid/hardware/Camera$Parameters;->getSupportedFlashModes()Ljava/util/List;

    move-result-object v1

    .line 1171
    if-eqz v1, :cond_4

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v3

    if-nez v3, :cond_d

    .line 1172
    :cond_4
    invoke-virtual {v0, v6}, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->setVisibility(I)V

    .line 1185
    :goto_6
    new-instance v1, Lcom/instagram/android/creation/b/i;

    invoke-direct {v1, p0}, Lcom/instagram/android/creation/b/i;-><init>(Lcom/instagram/android/creation/b/a;)V

    invoke-virtual {v0, v1}, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->setOnClickListener(Lcom/instagram/android/creation/widget/d;)V

    .line 1214
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->v()Landroid/view/View;

    move-result-object v1

    sget v2, Lcom/facebook/aw;->action_bar_camera_controls_switch_camera_button:I

    invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    .line 1215
    iget v2, p0, Lcom/instagram/android/creation/b/a;->b:I

    if-le v2, v8, :cond_11

    .line 1216
    new-instance v2, Lcom/instagram/android/creation/b/j;

    invoke-direct {v2, p0}, Lcom/instagram/android/creation/b/j;-><init>(Lcom/instagram/android/creation/b/a;)V

    invoke-virtual {v1, v2}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 1228
    :goto_7
    invoke-virtual {v1}, Landroid/view/View;->getVisibility()I

    move-result v1

    if-ne v1, v6, :cond_5

    .line 1229
    new-instance v1, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v1, v7, v7}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    .line 1232
    invoke-virtual {v0}, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->getVisibility()I

    move-result v2

    if-ne v2, v6, :cond_12

    .line 1233
    const/16 v0, 0xb

    invoke-virtual {v1, v0}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    .line 1234
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->aw:Lcom/instagram/android/creation/widget/ActionBarHighlightButton;

    invoke-virtual {v0, v1}, Lcom/instagram/android/creation/widget/ActionBarHighlightButton;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 1240
    :cond_5
    :goto_8
    return-void

    .line 1058
    :cond_6
    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v1}, Landroid/hardware/Camera$Parameters;->getSupportedPictureSizes()Ljava/util/List;

    move-result-object v1

    .line 1059
    iget-object v2, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-static {v0, v1, v2}, Lcom/instagram/camera/g;->a(Ljava/lang/String;Ljava/util/List;Landroid/hardware/Camera$Parameters;)Z

    goto/16 :goto_0

    .line 1103
    :cond_7
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v0}, Landroid/hardware/Camera$Parameters;->getSceneMode()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->ap:Ljava/lang/String;

    .line 1104
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ap:Ljava/lang/String;

    if-nez v0, :cond_2

    .line 1105
    const-string v0, "auto"

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->ap:Ljava/lang/String;

    goto/16 :goto_1

    .line 1123
    :cond_8
    const-string v1, "CameraFragment"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "invalid exposure range: "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v1, v0}, Lcom/facebook/e/a/a;->d(Ljava/lang/String;Ljava/lang/String;)V

    goto/16 :goto_2

    .line 1134
    :cond_9
    sget v0, Lcom/facebook/ba;->pref_camera_flash_mode_off:I

    invoke-virtual {p0, v0}, Lcom/instagram/android/creation/b/a;->b(I)Ljava/lang/String;

    move-result-object v0

    .line 1135
    invoke-static {v0, v1}, Lcom/instagram/android/creation/b/a;->a(Ljava/lang/String;Ljava/util/List;)Z

    move-result v1

    if-eqz v1, :cond_a

    .line 1136
    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v1, v0}, Landroid/hardware/Camera$Parameters;->setFlashMode(Ljava/lang/String;)V

    goto/16 :goto_3

    .line 1138
    :cond_a
    const-string v0, "CameraFragment"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "Unknown flash mode: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v2}, Landroid/hardware/Camera$Parameters;->getFlashMode()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/facebook/e/a/a;->d(Ljava/lang/String;Ljava/lang/String;)V

    goto/16 :goto_3

    .line 1150
    :cond_b
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v0}, Landroid/hardware/Camera$Parameters;->getWhiteBalance()Ljava/lang/String;

    move-result-object v0

    .line 1151
    if-nez v0, :cond_3

    .line 1152
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    const-string v1, "auto"

    invoke-virtual {v0, v1}, Landroid/hardware/Camera$Parameters;->setWhiteBalance(Ljava/lang/String;)V

    goto/16 :goto_4

    .line 1160
    :cond_c
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v1}, Landroid/hardware/Camera$Parameters;->getFocusMode()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/instagram/camera/m;->a(Ljava/lang/String;)V

    goto/16 :goto_5

    .line 1173
    :cond_d
    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v3

    if-ne v3, v8, :cond_e

    const/4 v3, 0x0

    invoke-interface {v1, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/String;

    const-string v3, "off"

    invoke-virtual {v1, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_e

    .line 1174
    invoke-virtual {v0, v6}, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->setVisibility(I)V

    goto/16 :goto_6

    .line 1176
    :cond_e
    const-string v1, "on"

    invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_f

    .line 1177
    sget-object v1, Lcom/instagram/android/creation/widget/e;->a:Lcom/instagram/android/creation/widget/e;

    invoke-virtual {v0, v1}, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->a(Lcom/instagram/android/creation/widget/e;)V

    goto/16 :goto_6

    .line 1178
    :cond_f
    const-string v1, "auto"

    invoke-virtual {v2, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_10

    .line 1179
    sget-object v1, Lcom/instagram/android/creation/widget/e;->c:Lcom/instagram/android/creation/widget/e;

    invoke-virtual {v0, v1}, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->a(Lcom/instagram/android/creation/widget/e;)V

    goto/16 :goto_6

    .line 1181
    :cond_10
    sget-object v1, Lcom/instagram/android/creation/widget/e;->b:Lcom/instagram/android/creation/widget/e;

    invoke-virtual {v0, v1}, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->a(Lcom/instagram/android/creation/widget/e;)V

    goto/16 :goto_6

    .line 1225
    :cond_11
    invoke-virtual {v1, v6}, Landroid/view/View;->setVisibility(I)V

    goto/16 :goto_7

    .line 1237
    :cond_12
    const/16 v2, 0xd

    invoke-virtual {v1, v2}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    .line 1238
    invoke-virtual {v0, v1}, Lcom/instagram/android/creation/widget/ActionBarCameraFlashButton;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    goto/16 :goto_8
.end method

.method private ay()V
    .locals 2
    .annotation build Landroid/annotation/TargetApi;
        value = 0xe
    .end annotation

    .prologue
    .line 1291
    iget-boolean v0, p0, Lcom/instagram/android/creation/b/a;->am:Z

    if-eqz v0, :cond_0

    .line 1292
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    invoke-virtual {v1}, Lcom/instagram/camera/m;->p()Z

    move-result v1

    invoke-virtual {v0, v1}, Landroid/hardware/Camera$Parameters;->setAutoExposureLock(Z)V

    .line 1295
    :cond_0
    iget-boolean v0, p0, Lcom/instagram/android/creation/b/a;->an:Z

    if-eqz v0, :cond_1

    .line 1296
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    invoke-virtual {v1}, Lcom/instagram/camera/m;->p()Z

    move-result v1

    invoke-virtual {v0, v1}, Landroid/hardware/Camera$Parameters;->setAutoWhiteBalanceLock(Z)V

    .line 1299
    :cond_1
    iget-boolean v0, p0, Lcom/instagram/android/creation/b/a;->aj:Z

    if-eqz v0, :cond_2

    .line 1300
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    invoke-virtual {v1}, Lcom/instagram/camera/m;->j()Ljava/util/List;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/hardware/Camera$Parameters;->setFocusAreas(Ljava/util/List;)V

    .line 1303
    :cond_2
    iget-boolean v0, p0, Lcom/instagram/android/creation/b/a;->ak:Z

    if-eqz v0, :cond_3

    .line 1305
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    invoke-virtual {v1}, Lcom/instagram/camera/m;->k()Ljava/util/List;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/hardware/Camera$Parameters;->setMeteringAreas(Ljava/util/List;)V

    .line 1307
    :cond_3
    return-void
.end method

.method private az()V
    .locals 6

    .prologue
    const-wide/32 v4, 0x2faf080

    const-wide/16 v2, 0x0

    .line 1479
    invoke-static {}, Lcom/instagram/m/b/a;->a()Lcom/instagram/m/b/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/m/b/a;->r()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 1480
    invoke-static {}, Lcom/instagram/android/support/camera/d;->a()J

    move-result-wide v0

    iput-wide v0, p0, Lcom/instagram/android/creation/b/a;->aa:J

    .line 1481
    iget-wide v0, p0, Lcom/instagram/android/creation/b/a;->aa:J

    cmp-long v0, v0, v4

    if-lez v0, :cond_2

    .line 1482
    iget-wide v0, p0, Lcom/instagram/android/creation/b/a;->aa:J

    sub-long/2addr v0, v4

    const-wide/32 v2, 0x16e360

    div-long/2addr v0, v2

    iput-wide v0, p0, Lcom/instagram/android/creation/b/a;->aa:J

    .line 1488
    :cond_0
    :goto_0
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->an()V

    .line 1490
    :cond_1
    return-void

    .line 1484
    :cond_2
    iget-wide v0, p0, Lcom/instagram/android/creation/b/a;->aa:J

    cmp-long v0, v0, v2

    if-lez v0, :cond_0

    .line 1485
    iput-wide v2, p0, Lcom/instagram/android/creation/b/a;->aa:J

    goto :goto_0
.end method

.method static synthetic b(Lcom/instagram/android/creation/b/a;F)F
    .locals 1
    .parameter
    .parameter

    .prologue
    .line 88
    iget v0, p0, Lcom/instagram/android/creation/b/a;->aP:F

    sub-float/2addr v0, p1

    iput v0, p0, Lcom/instagram/android/creation/b/a;->aP:F

    return v0
.end method

.method static synthetic b(Lcom/instagram/android/creation/b/a;)I
    .locals 1
    .parameter

    .prologue
    .line 88
    iget v0, p0, Lcom/instagram/android/creation/b/a;->aB:I

    return v0
.end method

.method static synthetic b(Lcom/instagram/android/creation/b/a;I)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 88
    invoke-direct {p0, p1}, Lcom/instagram/android/creation/b/a;->f(I)V

    return-void
.end method

.method static synthetic b(Lcom/instagram/android/creation/b/a;Z)Z
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 88
    iput-boolean p1, p0, Lcom/instagram/android/creation/b/a;->av:Z

    return p1
.end method

.method static synthetic c(Lcom/instagram/android/creation/b/a;F)F
    .locals 1
    .parameter
    .parameter

    .prologue
    .line 88
    iget v0, p0, Lcom/instagram/android/creation/b/a;->aP:F

    add-float/2addr v0, p1

    iput v0, p0, Lcom/instagram/android/creation/b/a;->aP:F

    return v0
.end method

.method static synthetic c(Lcom/instagram/android/creation/b/a;I)I
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 88
    iput p1, p0, Lcom/instagram/android/creation/b/a;->ad:I

    return p1
.end method

.method static synthetic c(Lcom/instagram/android/creation/b/a;)V
    .locals 0
    .parameter

    .prologue
    .line 88
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->ar()V

    return-void
.end method

.method static synthetic d(Lcom/instagram/android/creation/b/a;I)I
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 88
    iput p1, p0, Lcom/instagram/android/creation/b/a;->ae:I

    return p1
.end method

.method static synthetic d(Lcom/instagram/android/creation/b/a;)J
    .locals 2
    .parameter

    .prologue
    .line 88
    iget-wide v0, p0, Lcom/instagram/android/creation/b/a;->aF:J

    return-wide v0
.end method

.method static synthetic e(Lcom/instagram/android/creation/b/a;)Landroid/os/Handler;
    .locals 1
    .parameter

    .prologue
    .line 88
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ab:Landroid/os/Handler;

    return-object v0
.end method

.method private e(I)V
    .locals 4
    .parameter

    .prologue
    const/4 v3, 0x4

    const/4 v1, 0x0

    .line 1008
    iget v0, p0, Lcom/instagram/android/creation/b/a;->f:I

    or-int/2addr v0, p1

    iput v0, p0, Lcom/instagram/android/creation/b/a;->f:I

    .line 1009
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    if-nez v0, :cond_1

    .line 1012
    iput v1, p0, Lcom/instagram/android/creation/b/a;->f:I

    .line 1024
    :cond_0
    :goto_0
    return-void

    .line 1014
    :cond_1
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->aA()Z

    move-result v0

    if-eqz v0, :cond_2

    .line 1015
    iget v0, p0, Lcom/instagram/android/creation/b/a;->f:I

    invoke-direct {p0, v0}, Lcom/instagram/android/creation/b/a;->f(I)V

    .line 1016
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->aw()V

    .line 1017
    iput v1, p0, Lcom/instagram/android/creation/b/a;->f:I

    goto :goto_0

    .line 1019
    :cond_2
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ab:Landroid/os/Handler;

    invoke-virtual {v0, v3}, Landroid/os/Handler;->hasMessages(I)Z

    move-result v0

    if-nez v0, :cond_0

    .line 1020
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ab:Landroid/os/Handler;

    const-wide/16 v1, 0x3e8

    invoke-virtual {v0, v3, v1, v2}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z

    goto :goto_0
.end method

.method static synthetic e(Lcom/instagram/android/creation/b/a;I)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 88
    invoke-direct {p0, p1}, Lcom/instagram/android/creation/b/a;->g(I)V

    return-void
.end method

.method static synthetic f(Lcom/instagram/android/creation/b/a;)Lcom/instagram/camera/m;
    .locals 1
    .parameter

    .prologue
    .line 88
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    return-object v0
.end method

.method private f(I)V
    .locals 3
    .parameter

    .prologue
    .line 1313
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    invoke-virtual {v0}, Landroid/hardware/Camera;->getParameters()Landroid/hardware/Camera$Parameters;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    .line 1315
    and-int/lit8 v0, p1, 0x1

    if-eqz v0, :cond_0

    .line 1316
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->au()V

    .line 1319
    :cond_0
    and-int/lit8 v0, p1, 0x4

    if-eqz v0, :cond_1

    .line 1320
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->ax()V

    .line 1324
    :cond_1
    :try_start_0
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v0, v1}, Landroid/hardware/Camera;->setParameters(Landroid/hardware/Camera$Parameters;)V
    :try_end_0
    .catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0

    .line 1334
    :goto_0
    return-void

    .line 1325
    :catch_0
    move-exception v0

    .line 1326
    const-string v1, "CameraFragment"

    const-string v2, "Failed to set parameters"

    invoke-static {v1, v2, v0}, Lcom/facebook/e/a/a;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 1327
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ab:Landroid/os/Handler;

    new-instance v1, Lcom/instagram/android/creation/b/k;

    invoke-direct {v1, p0}, Lcom/instagram/android/creation/b/k;-><init>(Lcom/instagram/android/creation/b/a;)V

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    goto :goto_0
.end method

.method private g(I)V
    .locals 1
    .parameter

    .prologue
    .line 1473
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->aA:Lcom/instagram/camera/ui/RotateLayout;

    if-eqz v0, :cond_0

    .line 1474
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->aA:Lcom/instagram/camera/ui/RotateLayout;

    invoke-virtual {v0, p1}, Lcom/instagram/camera/ui/RotateLayout;->setOrientation(I)V

    .line 1476
    :cond_0
    return-void
.end method

.method static synthetic g(Lcom/instagram/android/creation/b/a;)V
    .locals 0
    .parameter

    .prologue
    .line 88
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->az()V

    return-void
.end method

.method static synthetic h(Lcom/instagram/android/creation/b/a;)I
    .locals 1
    .parameter

    .prologue
    .line 88
    iget v0, p0, Lcom/instagram/android/creation/b/a;->aI:I

    return v0
.end method

.method static synthetic i(Lcom/instagram/android/creation/b/a;)V
    .locals 0
    .parameter

    .prologue
    .line 88
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->aB()V

    return-void
.end method

.method static synthetic j(Lcom/instagram/android/creation/b/a;)V
    .locals 0
    .parameter

    .prologue
    .line 88
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->as()V

    return-void
.end method

.method static synthetic k(Lcom/instagram/android/creation/b/a;)Landroid/hardware/Camera$Parameters;
    .locals 1
    .parameter

    .prologue
    .line 88
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    return-object v0
.end method

.method static synthetic l(Lcom/instagram/android/creation/b/a;)Lcom/instagram/camera/k;
    .locals 1
    .parameter

    .prologue
    .line 88
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->af:Lcom/instagram/camera/k;

    return-object v0
.end method

.method static synthetic m(Lcom/instagram/android/creation/b/a;)I
    .locals 1
    .parameter

    .prologue
    .line 88
    iget v0, p0, Lcom/instagram/android/creation/b/a;->aJ:I

    return v0
.end method

.method static synthetic n(Lcom/instagram/android/creation/b/a;)I
    .locals 1
    .parameter

    .prologue
    .line 88
    iget v0, p0, Lcom/instagram/android/creation/b/a;->aK:I

    return v0
.end method

.method static synthetic o(Lcom/instagram/android/creation/b/a;)Z
    .locals 1
    .parameter

    .prologue
    .line 88
    iget-boolean v0, p0, Lcom/instagram/android/creation/b/a;->aD:Z

    return v0
.end method

.method static synthetic p(Lcom/instagram/android/creation/b/a;)Lcom/instagram/android/creation/b/m;
    .locals 1
    .parameter

    .prologue
    .line 88
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->aL:Lcom/instagram/android/creation/b/m;

    return-object v0
.end method

.method static synthetic q(Lcom/instagram/android/creation/b/a;)Landroid/net/Uri;
    .locals 1
    .parameter

    .prologue
    .line 88
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->aN:Landroid/net/Uri;

    return-object v0
.end method

.method static synthetic r(Lcom/instagram/android/creation/b/a;)V
    .locals 0
    .parameter

    .prologue
    .line 88
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->an()V

    return-void
.end method

.method static synthetic s(Lcom/instagram/android/creation/b/a;)F
    .locals 1
    .parameter

    .prologue
    .line 88
    iget v0, p0, Lcom/instagram/android/creation/b/a;->aP:F

    return v0
.end method

.method static synthetic t(Lcom/instagram/android/creation/b/a;)Ljava/lang/String;
    .locals 1
    .parameter

    .prologue
    .line 88
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->aG:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic u(Lcom/instagram/android/creation/b/a;)Z
    .locals 1
    .parameter

    .prologue
    .line 88
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->al()Z

    move-result v0

    return v0
.end method

.method static synthetic v(Lcom/instagram/android/creation/b/a;)I
    .locals 1
    .parameter

    .prologue
    .line 88
    iget v0, p0, Lcom/instagram/android/creation/b/a;->ad:I

    return v0
.end method

.method static synthetic w(Lcom/instagram/android/creation/b/a;)I
    .locals 1
    .parameter

    .prologue
    .line 88
    iget v0, p0, Lcom/instagram/android/creation/b/a;->ae:I

    return v0
.end method

.method static synthetic x(Lcom/instagram/android/creation/b/a;)Landroid/content/ContentResolver;
    .locals 1
    .parameter

    .prologue
    .line 88
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->g:Landroid/content/ContentResolver;

    return-object v0
.end method


# virtual methods
.method public X()V
    .locals 2

    .prologue
    .line 765
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->Z:Lcom/instagram/android/creation/b/l;

    invoke-virtual {v0, v1}, Landroid/hardware/Camera;->autoFocus(Landroid/hardware/Camera$AutoFocusCallback;)V

    .line 766
    const/4 v0, 0x2

    iput v0, p0, Lcom/instagram/android/creation/b/a;->e:I

    .line 767
    return-void
.end method

.method public Y()V
    .locals 1

    .prologue
    .line 771
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    invoke-virtual {v0}, Landroid/hardware/Camera;->cancelAutoFocus()V

    .line 772
    const/4 v0, 0x1

    iput v0, p0, Lcom/instagram/android/creation/b/a;->e:I

    .line 773
    const/4 v0, 0x4

    invoke-direct {p0, v0}, Lcom/instagram/android/creation/b/a;->f(I)V

    .line 774
    return-void
.end method

.method public Z()V
    .locals 5

    .prologue
    const/4 v4, 0x0

    .line 975
    iget-boolean v0, p0, Lcom/instagram/android/creation/b/a;->aD:Z

    if-eqz v0, :cond_0

    .line 1005
    :goto_0
    return-void

    .line 979
    :cond_0
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    .line 980
    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->af:Lcom/instagram/camera/k;

    invoke-static {v1}, Lcom/instagram/camera/g;->c(Landroid/content/SharedPreferences;)I

    move-result v1

    .line 982
    iget v2, p0, Lcom/instagram/android/creation/b/a;->aI:I

    if-eq v2, v1, :cond_1

    .line 983
    invoke-virtual {v0}, Landroid/support/v4/app/j;->getIntent()Landroid/content/Intent;

    move-result-object v1

    .line 984
    const/high16 v2, 0x400

    invoke-virtual {v1, v2}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    .line 985
    const/high16 v2, 0x200

    invoke-virtual {v1, v2}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    .line 986
    invoke-virtual {v0}, Landroid/support/v4/app/j;->getPackageName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 990
    invoke-static {}, Lcom/instagram/camera/e;->a()Lcom/instagram/camera/e;

    move-result-object v2

    invoke-virtual {v2}, Lcom/instagram/camera/e;->e()V

    .line 993
    :try_start_0
    invoke-virtual {v0, v1}, Landroid/support/v4/app/j;->startActivity(Landroid/content/Intent;)V
    :try_end_0
    .catch Landroid/content/ActivityNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    .line 999
    :goto_1
    invoke-virtual {v0, v4, v4}, Landroid/support/v4/app/j;->overridePendingTransition(II)V

    .line 1001
    invoke-virtual {v0}, Landroid/support/v4/app/j;->finish()V

    goto :goto_0

    .line 994
    :catch_0
    move-exception v2

    .line 995
    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;

    .line 996
    invoke-virtual {v0, v1}, Landroid/support/v4/app/j;->startActivity(Landroid/content/Intent;)V

    goto :goto_1

    .line 1003
    :cond_1
    const/4 v0, 0x4

    invoke-direct {p0, v0}, Lcom/instagram/android/creation/b/a;->e(I)V

    goto :goto_0
.end method

.method public a(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;
    .locals 5
    .parameter
    .parameter
    .parameter

    .prologue
    const/4 v1, 0x0

    .line 383
    sget v0, Lcom/facebook/ax;->fragment_camera:I

    invoke-virtual {p1, v0, p2, v1}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object v2

    .line 388
    sget v0, Lcom/facebook/aw;->camera_preview:I

    invoke-virtual {v2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/view/SurfaceView;

    .line 391
    invoke-virtual {v0, v1}, Landroid/view/SurfaceView;->setZOrderOnTop(Z)V

    .line 393
    invoke-virtual {v0}, Landroid/view/SurfaceView;->getHolder()Landroid/view/SurfaceHolder;

    move-result-object v0

    .line 394
    invoke-interface {v0, p0}, Landroid/view/SurfaceHolder;->addCallback(Landroid/view/SurfaceHolder$Callback;)V

    .line 395
    const/4 v3, 0x3

    invoke-interface {v0, v3}, Landroid/view/SurfaceHolder;->setType(I)V

    .line 398
    sget v0, Lcom/facebook/aw;->fragment_camera_shutter_button:I

    invoke-virtual {v2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/instagram/camera/ShutterButton;

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->ar:Lcom/instagram/camera/ShutterButton;

    .line 399
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ar:Lcom/instagram/camera/ShutterButton;

    invoke-virtual {v0, p0}, Lcom/instagram/camera/ShutterButton;->setOnShutterButtonListener(Lcom/instagram/camera/s;)V

    .line 400
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ar:Lcom/instagram/camera/ShutterButton;

    invoke-virtual {v0, v1}, Lcom/instagram/camera/ShutterButton;->setVisibility(I)V

    .line 402
    sget v0, Lcom/facebook/aw;->fragment_camera_gallery_button:I

    invoke-virtual {v2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/instagram/android/creation/widget/ActionBarHighlightButton;

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->as:Lcom/instagram/android/creation/widget/ActionBarHighlightButton;

    .line 403
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->as:Lcom/instagram/android/creation/widget/ActionBarHighlightButton;

    invoke-virtual {v0, p0}, Lcom/instagram/android/creation/widget/ActionBarHighlightButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 405
    sget v0, Lcom/facebook/aw;->fragment_camera_video_button:I

    invoke-virtual {v2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/instagram/android/creation/widget/ActionBarHighlightButton;

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->at:Lcom/instagram/android/creation/widget/ActionBarHighlightButton;

    .line 407
    iget-object v3, p0, Lcom/instagram/android/creation/b/a;->at:Lcom/instagram/android/creation/widget/ActionBarHighlightButton;

    invoke-static {}, Lcom/instagram/creation/video/c/b;->d()Z

    move-result v0

    if-eqz v0, :cond_1

    move v0, v1

    :goto_0
    invoke-virtual {v3, v0}, Lcom/instagram/android/creation/widget/ActionBarHighlightButton;->setVisibility(I)V

    .line 410
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->at:Lcom/instagram/android/creation/widget/ActionBarHighlightButton;

    invoke-virtual {v0, p0}, Lcom/instagram/android/creation/widget/ActionBarHighlightButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 412
    sget v0, Lcom/facebook/aw;->action_bar_camera_controls_cancel_button:I

    invoke-virtual {v2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    new-instance v3, Lcom/instagram/android/creation/b/e;

    invoke-direct {v3, p0}, Lcom/instagram/android/creation/b/e;-><init>(Lcom/instagram/android/creation/b/a;)V

    invoke-virtual {v0, v3}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 419
    invoke-static {}, Lcom/instagram/m/b/a;->a()Lcom/instagram/m/b/a;

    move-result-object v3

    .line 420
    sget v0, Lcom/facebook/aw;->grid_lines_view:I

    invoke-virtual {v2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    .line 421
    sget v0, Lcom/facebook/aw;->action_bar_camera_controls_grid_lines_button:I

    invoke-virtual {v2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/instagram/android/creation/widget/ActionBarHighlightButton;

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->aw:Lcom/instagram/android/creation/widget/ActionBarHighlightButton;

    .line 424
    invoke-virtual {v3}, Lcom/instagram/m/b/a;->d()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 425
    invoke-virtual {v4, v1}, Landroid/view/View;->setVisibility(I)V

    .line 428
    :cond_0
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->aw:Lcom/instagram/android/creation/widget/ActionBarHighlightButton;

    new-instance v1, Lcom/instagram/android/creation/b/f;

    invoke-direct {v1, p0, v4, v3}, Lcom/instagram/android/creation/b/f;-><init>(Lcom/instagram/android/creation/b/a;Landroid/view/View;Lcom/instagram/m/b/a;)V

    invoke-virtual {v0, v1}, Lcom/instagram/android/creation/widget/ActionBarHighlightButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 441
    return-object v2

    .line 407
    :cond_1
    const/4 v0, 0x4

    goto :goto_0
.end method

.method public a()V
    .locals 1

    .prologue
    .line 691
    iget-boolean v0, p0, Lcom/instagram/android/creation/b/a;->aD:Z

    if-eqz v0, :cond_0

    .line 696
    :goto_0
    return-void

    .line 695
    :cond_0
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    invoke-virtual {v0}, Lcom/instagram/camera/m;->c()V

    goto :goto_0
.end method

.method public a(IILandroid/content/Intent;)V
    .locals 3
    .parameter
    .parameter
    .parameter

    .prologue
    .line 643
    const/4 v0, -0x1

    if-eq p2, v0, :cond_0

    .line 665
    :goto_0
    return-void

    .line 648
    :cond_0
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->ak()V

    .line 650
    packed-switch p1, :pswitch_data_0

    goto :goto_0

    .line 652
    :pswitch_0
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->aM:Ljava/io/File;

    invoke-static {p3, v0}, Lcom/instagram/creation/base/e;->a(Landroid/content/Intent;Ljava/io/File;)Landroid/net/Uri;

    move-result-object v0

    .line 653
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v1

    invoke-static {v1, v0}, Lcom/instagram/android/support/camera/a;->a(Landroid/content/Context;Landroid/net/Uri;)Lcom/instagram/android/support/camera/a;

    move-result-object v0

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/instagram/android/support/camera/a;->b(I)Lcom/instagram/android/support/camera/a;

    move-result-object v0

    .line 657
    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->aG:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/instagram/android/support/camera/a;->a(Ljava/lang/String;)Lcom/instagram/android/support/camera/a;

    .line 658
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->al()Z

    move-result v1

    invoke-virtual {v0, v1}, Lcom/instagram/android/support/camera/a;->b(Z)Lcom/instagram/android/support/camera/a;

    .line 660
    invoke-virtual {v0}, Lcom/instagram/android/support/camera/a;->a()Landroid/content/Intent;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v0

    .line 661
    new-instance v1, Lcom/instagram/e/b/a/a;

    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->m()Landroid/support/v4/app/r;

    move-result-object v2

    invoke-direct {v1, v2}, Lcom/instagram/e/b/a/a;-><init>(Landroid/support/v4/app/r;)V

    new-instance v2, Lcom/instagram/creation/photo/crop/a;

    invoke-direct {v2}, Lcom/instagram/creation/photo/crop/a;-><init>()V

    invoke-virtual {v1, v2, v0}, Lcom/instagram/e/b/a/a;->a(Landroid/support/v4/app/Fragment;Landroid/os/Bundle;)Lcom/instagram/e/b/a/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/e/b/a/a;->e()V

    goto :goto_0

    .line 650
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
    .end packed-switch
.end method

.method public a(Landroid/os/Bundle;)V
    .locals 3
    .parameter

    .prologue
    .line 345
    invoke-super {p0, p1}, Lcom/instagram/e/b/b;->a(Landroid/os/Bundle;)V

    .line 347
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->ag()V

    .line 349
    new-instance v0, Lcom/instagram/camera/m;

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->af:Lcom/instagram/camera/k;

    sget v2, Lcom/facebook/ba;->pref_camera_focusmode_default:I

    invoke-virtual {p0, v2}, Lcom/instagram/android/creation/b/a;->b(I)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v0, v1, v2}, Lcom/instagram/camera/m;-><init>(Lcom/instagram/camera/k;Ljava/lang/String;)V

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    .line 352
    if-eqz p1, :cond_1

    .line 353
    const-string v0, "tempFileGallery"

    invoke-virtual {p1, v0}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 354
    if-eqz v0, :cond_0

    .line 355
    new-instance v1, Ljava/io/File;

    invoke-direct {v1, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    iput-object v1, p0, Lcom/instagram/android/creation/b/a;->aM:Ljava/io/File;

    .line 357
    :cond_0
    const-string v0, "pendingMediaKey"

    invoke-virtual {p1, v0}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->aG:Ljava/lang/String;

    .line 360
    :cond_1
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->aG:Ljava/lang/String;

    if-eqz v0, :cond_2

    invoke-static {}, Lcom/instagram/pendingmedia/b/a;->a()Lcom/instagram/pendingmedia/b/a;

    move-result-object v0

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->aG:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/instagram/pendingmedia/b/a;->a(Ljava/lang/String;)Lcom/instagram/pendingmedia/model/c;

    move-result-object v0

    if-nez v0, :cond_3

    .line 364
    :cond_2
    invoke-static {}, Ljava/lang/System;->nanoTime()J

    move-result-wide v0

    invoke-static {v0, v1}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/instagram/pendingmedia/model/c;->a(Ljava/lang/String;)Lcom/instagram/pendingmedia/model/c;

    move-result-object v0

    .line 365
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v1

    invoke-static {v1, v0}, Lcom/instagram/android/service/PendingMediaService;->b(Landroid/content/Context;Lcom/instagram/pendingmedia/model/c;)V

    .line 366
    invoke-virtual {v0}, Lcom/instagram/pendingmedia/model/c;->a()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->aG:Ljava/lang/String;

    .line 368
    :cond_3
    return-void
.end method

.method public a(Z)V
    .locals 2
    .parameter

    .prologue
    .line 673
    iget-boolean v0, p0, Lcom/instagram/android/creation/b/a;->aD:Z

    if-nez v0, :cond_0

    iget v0, p0, Lcom/instagram/android/creation/b/a;->e:I

    const/4 v1, 0x3

    if-ne v0, v1, :cond_1

    .line 687
    :cond_0
    :goto_0
    return-void

    .line 678
    :cond_1
    if-eqz p1, :cond_2

    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->ap()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 682
    :cond_2
    if-eqz p1, :cond_3

    .line 683
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    invoke-virtual {v0}, Lcom/instagram/camera/m;->a()V

    goto :goto_0

    .line 685
    :cond_3
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    invoke-virtual {v0}, Lcom/instagram/camera/m;->b()V

    goto :goto_0
.end method

.method public aa()Z
    .locals 6

    .prologue
    const/4 v5, 0x3

    const/4 v4, 0x0

    .line 1646
    iget v0, p0, Lcom/instagram/android/creation/b/a;->e:I

    if-eq v0, v5, :cond_0

    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    if-nez v0, :cond_1

    .line 1647
    :cond_0
    const/4 v0, 0x0

    .line 1655
    :goto_0
    return v0

    .line 1650
    :cond_1
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    iget v1, p0, Lcom/instagram/android/creation/b/a;->aI:I

    iget v2, p0, Lcom/instagram/android/creation/b/a;->ad:I

    invoke-static {}, Lcom/instagram/camera/e;->a()Lcom/instagram/camera/e;

    move-result-object v3

    invoke-static {v0, v1, v2, v3}, Lcom/instagram/camera/h;->a(Landroid/hardware/Camera$Parameters;IILcom/instagram/camera/e;)V

    .line 1651
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ah:Landroid/hardware/Camera$Parameters;

    invoke-virtual {v0, v1}, Landroid/hardware/Camera;->setParameters(Landroid/hardware/Camera$Parameters;)V

    .line 1653
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->i:Lcom/instagram/android/creation/b/r;

    new-instance v2, Lcom/instagram/android/creation/b/n;

    invoke-direct {v2, p0, v4}, Lcom/instagram/android/creation/b/n;-><init>(Lcom/instagram/android/creation/b/a;Lcom/instagram/android/creation/b/b;)V

    invoke-virtual {v0, v1, v4, v4, v2}, Landroid/hardware/Camera;->takePicture(Landroid/hardware/Camera$ShutterCallback;Landroid/hardware/Camera$PictureCallback;Landroid/hardware/Camera$PictureCallback;Landroid/hardware/Camera$PictureCallback;)V

    .line 1654
    iput v5, p0, Lcom/instagram/android/creation/b/a;->e:I

    .line 1655
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public ab()V
    .locals 1

    .prologue
    .line 1660
    const/4 v0, 0x4

    invoke-direct {p0, v0}, Lcom/instagram/android/creation/b/a;->f(I)V

    .line 1661
    return-void
.end method

.method public d(Landroid/os/Bundle;)V
    .locals 4
    .parameter

    .prologue
    const/4 v3, 0x0

    .line 455
    invoke-super {p0, p1}, Lcom/instagram/e/b/b;->d(Landroid/os/Bundle;)V

    .line 457
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/instagram/android/creation/b/a;->aD:Z

    .line 459
    new-instance v0, Ljava/lang/Thread;

    new-instance v1, Lcom/instagram/android/creation/b/g;

    invoke-direct {v1, p0}, Lcom/instagram/android/creation/b/g;-><init>(Lcom/instagram/android/creation/b/a;)V

    invoke-direct {v0, v1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->c:Ljava/lang/Thread;

    .line 471
    new-instance v0, Ljava/lang/Thread;

    new-instance v1, Lcom/instagram/android/creation/b/h;

    invoke-direct {v1, p0}, Lcom/instagram/android/creation/b/h;-><init>(Lcom/instagram/android/creation/b/a;)V

    invoke-direct {v0, v1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->d:Ljava/lang/Thread;

    .line 482
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->c:Ljava/lang/Thread;

    invoke-virtual {v0}, Ljava/lang/Thread;->start()V

    .line 484
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->af:Lcom/instagram/camera/k;

    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v1

    iget v2, p0, Lcom/instagram/android/creation/b/a;->aI:I

    invoke-virtual {v0, v1, v2}, Lcom/instagram/camera/k;->a(Landroid/content/Context;I)V

    .line 485
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->af:Lcom/instagram/camera/k;

    invoke-virtual {v0}, Lcom/instagram/camera/k;->b()Landroid/content/SharedPreferences;

    move-result-object v0

    invoke-static {v0}, Lcom/instagram/camera/g;->a(Landroid/content/SharedPreferences;)V

    .line 487
    invoke-static {}, Lcom/instagram/camera/e;->a()Lcom/instagram/camera/e;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/camera/e;->b()I

    move-result v0

    iput v0, p0, Lcom/instagram/android/creation/b/a;->b:I

    .line 490
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->ac()V

    .line 494
    :try_start_0
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->c:Ljava/lang/Thread;

    invoke-virtual {v0}, Ljava/lang/Thread;->join()V

    .line 495
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->c:Ljava/lang/Thread;

    .line 496
    iget-boolean v0, p0, Lcom/instagram/android/creation/b/a;->au:Z

    if-eqz v0, :cond_0

    .line 497
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    sget v1, Lcom/facebook/ba;->cannot_connect_camera:I

    invoke-static {v0, v1}, Lcom/instagram/camera/h;->b(Landroid/app/Activity;I)V

    .line 530
    :goto_0
    return-void

    .line 500
    :cond_0
    iget-boolean v0, p0, Lcom/instagram/android/creation/b/a;->av:Z

    if-eqz v0, :cond_1

    .line 501
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    sget v1, Lcom/facebook/ba;->cannot_connect_camera:I

    invoke-static {v0, v1}, Lcom/instagram/camera/h;->b(Landroid/app/Activity;I)V
    :try_end_0
    .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 505
    :catch_0
    move-exception v0

    .line 508
    :cond_1
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->d:Ljava/lang/Thread;

    invoke-virtual {v0}, Ljava/lang/Thread;->start()V

    .line 510
    invoke-static {}, Lcom/instagram/camera/e;->a()Lcom/instagram/camera/e;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/camera/e;->f()I

    move-result v0

    iput v0, p0, Lcom/instagram/android/creation/b/a;->aK:I

    .line 511
    invoke-static {}, Lcom/instagram/camera/e;->a()Lcom/instagram/camera/e;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/camera/e;->g()I

    move-result v0

    iput v0, p0, Lcom/instagram/android/creation/b/a;->aJ:I

    .line 514
    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->d:Ljava/lang/Thread;

    monitor-enter v1

    .line 516
    :try_start_1
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->d:Ljava/lang/Thread;

    invoke-virtual {v0}, Ljava/lang/Object;->wait()V
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0
    .catch Ljava/lang/InterruptedException; {:try_start_1 .. :try_end_1} :catch_2

    .line 520
    :goto_1
    :try_start_2
    monitor-exit v1
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    .line 524
    :try_start_3
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->d:Ljava/lang/Thread;

    invoke-virtual {v0}, Ljava/lang/Thread;->join()V
    :try_end_3
    .catch Ljava/lang/InterruptedException; {:try_start_3 .. :try_end_3} :catch_1

    .line 529
    :goto_2
    iput-object v3, p0, Lcom/instagram/android/creation/b/a;->d:Ljava/lang/Thread;

    goto :goto_0

    .line 520
    :catchall_0
    move-exception v0

    :try_start_4
    monitor-exit v1
    :try_end_4
    .catchall {:try_start_4 .. :try_end_4} :catchall_0

    throw v0

    .line 525
    :catch_1
    move-exception v0

    goto :goto_2

    .line 517
    :catch_2
    move-exception v0

    goto :goto_1
.end method

.method public d_()Ljava/lang/String;
    .locals 1

    .prologue
    .line 1716
    const-string v0, "camera"

    return-object v0
.end method

.method public e(Landroid/os/Bundle;)V
    .locals 2
    .parameter

    .prologue
    .line 372
    invoke-super {p0, p1}, Lcom/instagram/e/b/b;->e(Landroid/os/Bundle;)V

    .line 374
    const-string v0, "pendingMediaKey"

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->aG:Ljava/lang/String;

    invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 375
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->aM:Ljava/io/File;

    if-eqz v0, :cond_0

    .line 376
    const-string v0, "tempFileGallery"

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->aM:Ljava/io/File;

    invoke-virtual {v1}, Ljava/io/File;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p1, v0, v1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 378
    :cond_0
    return-void
.end method

.method public f_()V
    .locals 1

    .prologue
    .line 534
    invoke-super {p0}, Lcom/instagram/e/b/b;->f_()V

    .line 540
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->aq()V

    .line 542
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/instagram/android/creation/b/a;->aE:Z

    .line 543
    return-void
.end method

.method public g_()V
    .locals 1

    .prologue
    const/4 v0, 0x0

    .line 446
    invoke-super {p0}, Lcom/instagram/e/b/b;->g_()V

    .line 447
    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->ar:Lcom/instagram/camera/ShutterButton;

    .line 448
    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->as:Lcom/instagram/android/creation/widget/ActionBarHighlightButton;

    .line 449
    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->at:Lcom/instagram/android/creation/widget/ActionBarHighlightButton;

    .line 450
    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->aw:Lcom/instagram/android/creation/widget/ActionBarHighlightButton;

    .line 451
    return-void
.end method

.method public onClick(Landroid/view/View;)V
    .locals 5
    .parameter "v"

    .prologue
    const/4 v4, 0x1

    .line 700
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->as:Lcom/instagram/android/creation/widget/ActionBarHighlightButton;

    if-ne p1, v0, :cond_1

    .line 701
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->am()V

    .line 714
    :cond_0
    :goto_0
    return-void

    .line 702
    :cond_1
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->at:Lcom/instagram/android/creation/widget/ActionBarHighlightButton;

    if-ne p1, v0, :cond_0

    .line 704
    invoke-static {}, Lcom/instagram/creation/video/j/i;->b()Z

    move-result v0

    if-nez v0, :cond_2

    .line 705
    sget v0, Lcom/facebook/ba;->video_not_enough_space_for_recording:I

    new-array v1, v4, [Ljava/lang/Object;

    const/4 v2, 0x0

    invoke-static {}, Lcom/instagram/creation/video/j/i;->c()I

    move-result v3

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    aput-object v3, v1, v2

    invoke-virtual {p0, v0, v1}, Lcom/instagram/android/creation/b/a;->a(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    .line 707
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v1

    invoke-static {v1, v0, v4}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    goto :goto_0

    .line 711
    :cond_2
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    check-cast v0, Lcom/instagram/creation/base/b;

    sget-object v1, Lcom/instagram/creation/base/c;->b:Lcom/instagram/creation/base/c;

    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->al()Z

    move-result v2

    invoke-interface {v0, v1, v2}, Lcom/instagram/creation/base/b;->a(Lcom/instagram/creation/base/c;Z)V

    goto :goto_0
.end method

.method public onTouch(Landroid/view/View;Landroid/view/MotionEvent;)Z
    .locals 3
    .parameter "v"
    .parameter "e"

    .prologue
    const/4 v0, 0x0

    .line 779
    iget-boolean v1, p0, Lcom/instagram/android/creation/b/a;->aD:Z

    if-nez v1, :cond_0

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    if-eqz v1, :cond_0

    iget-boolean v1, p0, Lcom/instagram/android/creation/b/a;->aE:Z

    if-eqz v1, :cond_0

    iget v1, p0, Lcom/instagram/android/creation/b/a;->e:I

    const/4 v2, 0x3

    if-ne v1, v2, :cond_1

    .line 789
    :cond_0
    :goto_0
    return v0

    .line 785
    :cond_1
    iget-boolean v1, p0, Lcom/instagram/android/creation/b/a;->aj:Z

    if-nez v1, :cond_2

    iget-boolean v1, p0, Lcom/instagram/android/creation/b/a;->ak:Z

    if-nez v1, :cond_2

    iget-boolean v1, p0, Lcom/instagram/android/creation/b/a;->al:Z

    if-eqz v1, :cond_0

    .line 789
    :cond_2
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    invoke-virtual {v0, p2}, Lcom/instagram/camera/m;->a(Landroid/view/MotionEvent;)Z

    move-result v0

    goto :goto_0
.end method

.method public surfaceChanged(Landroid/view/SurfaceHolder;III)V
    .locals 3
    .parameter "holder"
    .parameter "format"
    .parameter "w"
    .parameter "h"

    .prologue
    .line 794
    invoke-interface {p1}, Landroid/view/SurfaceHolder;->getSurface()Landroid/view/Surface;

    move-result-object v0

    if-nez v0, :cond_1

    .line 795
    const-string v0, "CameraFragment"

    const-string v1, "holder.getSurface() == null"

    invoke-static {v0, v1}, Lcom/facebook/e/a/a;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 846
    :cond_0
    :goto_0
    return-void

    .line 799
    :cond_1
    const-string v0, "CameraFragment"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "surfaceChanged. w="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ". h="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/facebook/e/a/a;->a(Ljava/lang/String;Ljava/lang/String;)V

    .line 801
    invoke-static {}, Lcom/instagram/b/a;->b()Lcom/instagram/b/g;

    move-result-object v0

    const-string v1, "camera_surface_init"

    invoke-interface {v0, v1}, Lcom/instagram/b/g;->a(Ljava/lang/String;)V

    .line 806
    iput-object p1, p0, Lcom/instagram/android/creation/b/a;->aq:Landroid/view/SurfaceHolder;

    .line 811
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    if-eqz v0, :cond_0

    .line 815
    iget-boolean v0, p0, Lcom/instagram/android/creation/b/a;->aD:Z

    if-nez v0, :cond_0

    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    invoke-virtual {v0}, Landroid/support/v4/app/j;->isFinishing()Z

    move-result v0

    if-nez v0, :cond_0

    .line 822
    iget v0, p0, Lcom/instagram/android/creation/b/a;->e:I

    if-nez v0, :cond_3

    .line 823
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->as()V

    .line 839
    :cond_2
    :goto_1
    iget-boolean v0, p0, Lcom/instagram/android/creation/b/a;->aE:Z

    if-nez v0, :cond_5

    .line 840
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ab:Landroid/os/Handler;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    .line 845
    :goto_2
    invoke-static {}, Lcom/instagram/b/a;->b()Lcom/instagram/b/g;

    move-result-object v0

    const-string v1, "camera_surface_init"

    invoke-interface {v0, v1}, Lcom/instagram/b/g;->b(Ljava/lang/String;)V

    goto :goto_0

    .line 825
    :cond_3
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    invoke-static {v0}, Lcom/instagram/camera/h;->a(Landroid/app/Activity;)I

    move-result v0

    iget v1, p0, Lcom/instagram/android/creation/b/a;->aB:I

    if-eq v0, v1, :cond_4

    .line 826
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->ar()V

    .line 828
    :cond_4
    invoke-interface {p1}, Landroid/view/SurfaceHolder;->isCreating()Z

    move-result v0

    if-eqz v0, :cond_2

    .line 832
    invoke-direct {p0, p1}, Lcom/instagram/android/creation/b/a;->a(Landroid/view/SurfaceHolder;)V

    goto :goto_1

    .line 842
    :cond_5
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->af()V

    goto :goto_2
.end method

.method public surfaceCreated(Landroid/view/SurfaceHolder;)V
    .locals 0
    .parameter "holder"

    .prologue
    .line 849
    return-void
.end method

.method public surfaceDestroyed(Landroid/view/SurfaceHolder;)V
    .locals 1
    .parameter "holder"

    .prologue
    .line 852
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->at()V

    .line 853
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->aq:Landroid/view/SurfaceHolder;

    .line 854
    return-void
.end method

.method public w()V
    .locals 4

    .prologue
    const/4 v2, 0x1

    .line 547
    invoke-super {p0}, Lcom/instagram/e/b/b;->w()V

    .line 549
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/instagram/android/creation/b/a;->aD:Z

    .line 551
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->ah()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 590
    :cond_0
    :goto_0
    return-void

    .line 555
    :cond_1
    iget-boolean v0, p0, Lcom/instagram/android/creation/b/a;->au:Z

    if-nez v0, :cond_0

    iget-boolean v0, p0, Lcom/instagram/android/creation/b/a;->av:Z

    if-nez v0, :cond_0

    .line 560
    iget v0, p0, Lcom/instagram/android/creation/b/a;->e:I

    if-nez v0, :cond_2

    .line 562
    :try_start_0
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    iget v1, p0, Lcom/instagram/android/creation/b/a;->aI:I

    invoke-static {v0, v1}, Lcom/instagram/camera/h;->a(Landroid/app/Activity;I)Landroid/hardware/Camera;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->ag:Landroid/hardware/Camera;

    .line 563
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->aB()V

    .line 564
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->ac()V

    .line 565
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->as()V
    :try_end_0
    .catch Lcom/instagram/camera/d; {:try_start_0 .. :try_end_0} :catch_0
    .catch Lcom/instagram/camera/b; {:try_start_0 .. :try_end_0} :catch_1

    .line 575
    :cond_2
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->aq:Landroid/view/SurfaceHolder;

    if-eqz v0, :cond_3

    .line 578
    iget-boolean v0, p0, Lcom/instagram/android/creation/b/a;->aE:Z

    if-nez v0, :cond_4

    .line 579
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ab:Landroid/os/Handler;

    invoke-virtual {v0, v2}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    .line 584
    :cond_3
    :goto_1
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->aj()V

    .line 586
    iget v0, p0, Lcom/instagram/android/creation/b/a;->e:I

    if-ne v0, v2, :cond_0

    .line 587
    invoke-static {}, Landroid/os/SystemClock;->uptimeMillis()J

    move-result-wide v0

    iput-wide v0, p0, Lcom/instagram/android/creation/b/a;->aF:J

    .line 588
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ab:Landroid/os/Handler;

    const/4 v1, 0x2

    const-wide/16 v2, 0x64

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z

    goto :goto_0

    .line 566
    :catch_0
    move-exception v0

    .line 567
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    sget v1, Lcom/facebook/ba;->cannot_connect_camera:I

    invoke-static {v0, v1}, Lcom/instagram/camera/h;->b(Landroid/app/Activity;I)V

    goto :goto_0

    .line 569
    :catch_1
    move-exception v0

    .line 570
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    sget v1, Lcom/facebook/ba;->cannot_connect_camera:I

    invoke-static {v0, v1}, Lcom/instagram/camera/h;->b(Landroid/app/Activity;I)V

    goto :goto_0

    .line 581
    :cond_4
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->af()V

    goto :goto_1
.end method

.method public x()V
    .locals 3

    .prologue
    const/4 v2, 0x1

    .line 600
    iput-boolean v2, p0, Lcom/instagram/android/creation/b/a;->aD:Z

    .line 602
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->at()V

    .line 604
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->aq()V

    .line 605
    invoke-direct {p0}, Lcom/instagram/android/creation/b/a;->ai()V

    .line 607
    iget-boolean v0, p0, Lcom/instagram/android/creation/b/a;->aE:Z

    if-eqz v0, :cond_0

    .line 608
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ac:Lcom/instagram/android/creation/b/p;

    invoke-virtual {v0}, Lcom/instagram/android/creation/b/p;->b()V

    .line 609
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->aL:Lcom/instagram/android/creation/b/m;

    if-eqz v0, :cond_0

    .line 610
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->aL:Lcom/instagram/android/creation/b/m;

    invoke-virtual {v0}, Lcom/instagram/android/creation/b/m;->b()V

    .line 611
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/instagram/android/creation/b/a;->aL:Lcom/instagram/android/creation/b/m;

    .line 615
    :cond_0
    iget-boolean v0, p0, Lcom/instagram/android/creation/b/a;->h:Z

    if-eqz v0, :cond_1

    .line 616
    invoke-virtual {p0}, Lcom/instagram/android/creation/b/a;->j()Landroid/support/v4/app/j;

    move-result-object v0

    iget-object v1, p0, Lcom/instagram/android/creation/b/a;->aQ:Landroid/content/BroadcastReceiver;

    invoke-virtual {v0, v1}, Landroid/support/v4/app/j;->unregisterReceiver(Landroid/content/BroadcastReceiver;)V

    .line 617
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/instagram/android/creation/b/a;->h:Z

    .line 620
    :cond_1
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    invoke-virtual {v0}, Lcom/instagram/camera/m;->h()V

    .line 623
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ab:Landroid/os/Handler;

    invoke-virtual {v0, v2}, Landroid/os/Handler;->removeMessages(I)V

    .line 624
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ab:Landroid/os/Handler;

    const/4 v1, 0x2

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    .line 625
    iget-object v0, p0, Lcom/instagram/android/creation/b/a;->ao:Lcom/instagram/camera/m;

    invoke-virtual {v0}, Lcom/instagram/camera/m;->o()V

    .line 627
    invoke-super {p0}, Lcom/instagram/e/b/b;->x()V

    .line 628
    return-void
.end method
